﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace WpfApp1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            this.Activated += WindowThd_Activated;

            this.Closing += WindowThd_Closing;

            this.ContentRendered += WindowThd_ContentRendered;

            this.Deactivated += WindowThd_Deactivated;

            this.Loaded += WindowThd_Loaded;

            this.Closed += WindowThd_Closed;

            this.Unloaded += WindowThd_Unloaded;

            this.SourceInitialized += WindowThd_SourceInitialized;

            InitializeComponent();
        }

        void WindowThd_SourceInitialized(object sender, EventArgs e)

        {

            Trace.WriteLine("1---SourceInitialized！");

        }



        void WindowThd_Unloaded(object sender, RoutedEventArgs e)

        {

            Trace.WriteLine("Unloaded！");

        }



        void WindowThd_Closed(object sender, EventArgs e)

        {

            Trace.WriteLine("_Closed！");

        }



        void WindowThd_Loaded(object sender, RoutedEventArgs e)

        {

            Trace.WriteLine("3---Loaded！");

        }



        void WindowThd_Deactivated(object sender, EventArgs e)

        {

            Trace.WriteLine("Deactivated！");

        }



        void WindowThd_ContentRendered(object sender, EventArgs e)

        {

            Trace.WriteLine("ContentRendered！");

        }



        void WindowThd_Closing(object sender, System.ComponentModel.CancelEventArgs e)

        {

            Trace.WriteLine("---Closing！");

        }



        void WindowThd_Activated(object sender, EventArgs e)

        {

            Trace.WriteLine("2---Activated！");

        }
    }
}
